<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <f:view contentType="text/html">
        <h:head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
            <title>Facelet Title</title>
            <link type="text/css" rel="stylesheet" href="#{request.contextPath}/recursos/css/default.css" />
            <script type="text/javascript" src="#{request.contextPath}/recursos/js/script.js" />
            <link rel="stylesheet" href="#{request.contextPath}/css/estilos.css" type="text/css" media="all" />
        </h:head>
        <h:body>
            <div>
                <div id="layout" align="center">
                    <div id="page1" class="top" align="center">
                        <h:panelGrid columns="1">
                            <h:graphicImage value="/images/logo.gif" rendered="true" height="50" width="250" /> 
                        </h:panelGrid>
                    </div>
                    <p:separator />
                    <div id="content" style="width: 500px;height: 300px; border: #004276;border-style: solid; border-width: 0px;">
                        <h:form id="frmLogin" prependId="false">
                            <p:panel id="pnlLogin">
                                <p:messages id="msgs" showDetail="true"/>
                                <p:focus for="idFocus"/>
                                <h:panelGrid columns="2" cellpadding="5">
                                    <h:outputLabel value="USUARIO" styleClass="label"/>
                                    <p:inputText id="idFocus" size="50"
                                                 style="#{applicationMBean.estiloObligatorio}"
                                                 label="USUARIO" required="true"
                                                 value="#{loginMBean.usr}"/>

                                    <h:outputLabel value="CONTRASEÑA" styleClass="label"/>
                                    <p:password id="idContrasena" label="CONTRASEÑA"
                                                feedback="false" style="#{applicationMBean.estiloObligatorio}"
                                                size="50" required="true"
                                                value="#{loginMBean.pwd}"/>

                                </h:panelGrid>
                                <p:separator/>
                                <p:blockUI block="pnlLogin" trigger="btnIngresar" />
                                <h:panelGrid columns="4" cellpadding="5">
                                    <p:commandButton icon="ui-icon ui-icon-home" id="btnIngresar" value="INGRESAR"
                                                     ajax="false" action="#{loginMBean.ingresar}" style="font-size: 12px;">                                
                                    </p:commandButton>
                                </h:panelGrid>
                                <p:separator/>
                            </p:panel>
                        </h:form>
                    </div>
                </div>
            </div>
        </h:body>
    </f:view>
</html>

